#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ll R;
  cin >> R;
  R *= 2;
  ll ans = 0;
  for (ll x = 1, y = R; x < R; x += 2) {
    ll mx = R * R - x * x;
    while (y && y * y > mx) y--;
    ll now = max(0ll, (y - 1) / 2 * 2 + 1);
    ans += now * min(2ll, x);
  }
  cout << ans;
  return 0;
}